//
//  UIImage+HZY.m
//  Adorable_Things
//
//  Created by huzhiyan on 16/1/14.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "UIImage+HZY.h"

@implementation UIImage (HZY)

// 修改imageView的图片大小方法
+ (UIImage *)imageWithImage:(UIImage *)image scaleToSize:(CGSize)newSize
{
    UIGraphicsBeginImageContext(newSize);
    [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newImage;
}

@end
